import { config } from '../../config/index';
import { request, upload } from '../../utils/request';

export function uploadPictures(file, reviews_id) {
  return upload('reviews/upload', file, reviews_id).then((res) => {
    return res;
  });
}

export function createReviews(reviewObj) {
  return request('reviews/create', reviewObj, 'POST').then((res) => {
    return res;
  });
}

export function updateImages(reviewsNamesObj) {
  return request('reviews/images/push', reviewsNamesObj, 'POST').then((res) => {
    return res;
  });
}